
export default {
  computed: {
    // 表格中列字段
    columns() {
      return [
        {
          key: 'sf_code',
          title: {
            'zh-CN': '仪表编码',
            'en-US': 'sf_code'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        },
        {
          key: 'sf_name',
          title: {
            'zh-CN': '仪表名称',
            'en-US': 'sf_name'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        },
        {
          key: 'initValue',
          title: {
            'zh-CN': '初始数值',
            'en-US': 'initValue'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          show: true
        },
        {
          key: 'installTime',
          title: {
            'zh-CN': '安装时间',
            'en-US': 'installTime'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        },
        {
          key: 'thisMonthEstimateNum',
          title: {
            'zh-CN': '本月暂估值',
            'en-US': 'thisMonthEstimateNum'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        },
        {
          key: 'upperLimitValue',
          title: {
            'zh-CN': '仪表上限值',
            'en-US': 'upperLimitValue'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        },
        {
          key: 'remark',
          title: {
            'zh-CN': '备注',
            'en-US': 'remark'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          show: true
        },
        {
          key: 'createdBy',
          title: {
            'zh-CN': '创建人账号',
            'en-US': 'created by'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        },
        {
          key: 'createTime',
          title: {
            'zh-CN': '创建时间',
            'en-US': 'create time'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        },
        {
          key: 'updatedBy',
          title: {
            'zh-CN': '修改人账号',
            'en-US': 'updated by'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        },
        {
          key: 'updateTime',
          title: {
            'zh-CN': '修改时间',
            'en-US': 'update time'
          }[this.G_Locale],
          minWidth: 200,
          align: 'center',
          show: true
        }
      ];
    },
    queryFormItem() {
      return [
        {
          key: 'sf_code',
          title: {
            'zh-CN': '仪表编码',
            'en-US': 'sf_code'
          }[this.G_Locale],
          config: {
            type: 'text'
          }
        },
        {
          key: 'sf_name',
          title: {
            'zh-CN': '仪表名称',
            'en-US': 'sf_name'
          }[this.G_Locale],
          config: {
            type: 'text'
          }
        }
      ];
    },
    collapseFormItem() {
      return [
        {
          key: 'sf_code',
          title: {
            'zh-CN': '仪表编码',
            'en-US': 'sf_code'
          }[this.G_Locale],
          config: {
            type: 'text'
          }
        },
        {
          key: 'sf_name',
          title: {
            'zh-CN': '仪表名称',
            'en-US': 'sf_name'
          }[this.G_Locale],
          config: {
            type: 'text'
          }
        }
      ];
    },
    // 抄表
    resultColumns() {
      return [
        {
          key: 'sf_code',
          title: {
            'zh-CN': '仪表编码',
            'en-US': 'sf_code'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: '' }
        },
        {
          key: 'sf_name',
          title: {
            'zh-CN': '仪表名称',
            'en-US': 'sf_name'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: '' }
        },
        {
          key: 'currentValue',
          title: {
            'zh-CN': '当前数值',
            'en-US': 'currentValue'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' },
          rule: { required: true, type: 'number', message: '不能为空', trigger: 'blur' }
        },
        {
          key: 'activePower',
          title: {
            'zh-CN': '有功',
            'en-US': 'activePower'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'idlePower',
          title: {
            'zh-CN': '无功',
            'en-US': 'idlePower'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'spike',
          title: {
            'zh-CN': '尖峰',
            'en-US': 'spike'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'onPeakElectric',
          title: {
            'zh-CN': '峰电',
            'en-US': 'onPeakElectric'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'offPeakElectric',
          title: {
            'zh-CN': '谷电',
            'en-US': 'offPeakElectric'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'nonResident',
          title: {
            'zh-CN': '非居',
            'en-US': 'nonResident'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'pingDian',
          title: {
            'zh-CN': '平电',
            'en-US': 'pingDian'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'basicPrice',
          title: {
            'zh-CN': '基本费用',
            'en-US': 'basicPrice'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'activePowerTotal',
          title: {
            'zh-CN': '总有功',
            'en-US': 'activePowerTotal'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'idlePowerTotal',
          title: {
            'zh-CN': '总无功',
            'en-US': 'idlePowerTotal'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'liDiaoPowerRate',
          title: {
            'zh-CN': '力调电费',
            'en-US': 'liDiaoPowerRate'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        },
        {
          key: 'priceDiff',
          title: {
            'zh-CN': '电费补差',
            'en-US': 'priceDiff'
          }[this.G_Locale],
          minWidth: 100,
          align: 'center',
          config: { type: 'number' }
        }
      ];
    },
    lang() {
      return {
        'en-US': {
          cancel: 'cancel',
          confirmDelete: 'confirm delete?'
        },
        'zh-CN': {
          cancel: '取消',
          confirmDelete: '确认删除？'
        }
      }[this.G_Locale]
    }
  },
}
